package b2_heap;
/**
 * 测试最大堆
 */
public class TestMaxHeap {
    public static void main(String[] args) {

        //数组堆化
        int[] arr = new int[]{30,16,15,22,19,17,13,61,28,41};
        MaxHeap heap = new MaxHeap(arr);
        System.out.println(heap);

        //添加元素
        heap.add(50);
        System.out.println(heap);

        //弹出最大元素
        heap.extractMax();
        System.out.println(heap);
    }
}
